package com.deyou.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.deyou.R;
import com.deyou.base.BaseActivity;
import com.deyou.model.HouseResourceAttrBean;
import com.deyou.util.AndroidUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class HouseTypeActivity extends BaseActivity {

    @BindView(R.id.tv_mid_title)
    TextView tvMidTitle;

    private int dvalue;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_house_type);
        ButterKnife.bind(this);
        tvMidTitle.setText("添加房源");
    }

    @Override
    protected boolean translucentStatusBar() {
        return super.translucentStatusBar();
    }

    @OnClick({R.id.iv_left_back, R.id.whole_house_layout, R.id.single_room_layout, R.id.share_room_layout})
    public void onViewClicked(View view) {
        Bundle bundle = new Bundle();
        HouseResourceAttrBean attrBean = new HouseResourceAttrBean();
        switch (view.getId()) {
            case R.id.iv_left_back:
                finish();
                break;
            case R.id.whole_house_layout:
                attrBean.setResourceRentaltype(2);
                bundle.putSerializable("houseAttr", attrBean);
                AndroidUtils.startNextActivity(HouseTypeActivity.this, HouseTypeListActivity.class, bundle, false);
                break;
            case R.id.single_room_layout:
                attrBean.setResourceRentaltype(3);
                bundle.putSerializable("houseAttr", attrBean);
                AndroidUtils.startNextActivity(HouseTypeActivity.this, HouseTypeListActivity.class, bundle, false);
                break;
            case R.id.share_room_layout:
                attrBean.setResourceRentaltype(4);
                bundle.putSerializable("houseAttr", attrBean);
                AndroidUtils.startNextActivity(HouseTypeActivity.this, HouseTypeListActivity.class, bundle, false);
                break;
        }
    }
}
